<?php
/**
 * Created by PhpStorm.
 * User: 4399-1500
 * Date: 2018/5/24
 * Time: 14:53
 */

namespace Hooks;
use Yaf\Plugin_Abstract;
use Yaf\Registry;
use Yaf\Response_Abstract;
use Yaf\Request_Abstract;
class AdminMiddlewarePlugin extends Plugin_Abstract
{
    public function dispatchLoopShutdown(Request_Abstract $request, Response_Abstract $response)
    {
        //手动关闭mysql链接
        Registry::get('conn')->close();
    }
}